package org.resotc.dao;

import java.util.HashMap;

import org.resotc.model.Intersection;

public interface IntersectionDAO {

	/**
	 * Returns an intersection selected by an id.
	 * 
	 * @param id
	 * @return
	 */
	public Intersection getIntersection(int id);

	/**
	 * Returns all intersections as a HashMap.
	 * 
	 * @return
	 */
	public HashMap<Integer, Intersection> getIntersections();

	/**
	 * Creates a new intersection.
	 * 
	 * @param intersection
	 */
	public void createIntersection(Intersection intersection);

	/**
	 * Updates an existing intersection.
	 * 
	 * @param intersection
	 */
	public void updateIntersection(Intersection intersection);

	/**
	 * Deletes an intersection.
	 * 
	 * @param id
	 */
	public void deleteIntersection(int id);

	/**
	 * Returns true or false whether the intersections exists or not.
	 * 
	 * @param id
	 * @return
	 */
	public boolean intersectionExists(int id);
}
